package com.express.e.root.utils;

import java.util.Objects;

public class AdminWrap {
    private Integer adminId;
    private String adminName;
    private String adminPwd;
    private String loginIP;
    private String lastTime;
    private String state;
    private String role;
    private String phone;
    private String cardId;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof AdminWrap)) return false;
        AdminWrap adminWrap = (AdminWrap) o;
        return Objects.equals(getAdminId(), adminWrap.getAdminId()) &&
                Objects.equals(getAdminName(), adminWrap.getAdminName()) &&
                Objects.equals(getAdminPwd(), adminWrap.getAdminPwd()) &&
                Objects.equals(getLoginIP(), adminWrap.getLoginIP()) &&
                Objects.equals(getLastTime(), adminWrap.getLastTime()) &&
                Objects.equals(getState(), adminWrap.getState()) &&
                Objects.equals(getRole(), adminWrap.getRole()) &&
                Objects.equals(getPhone(), adminWrap.getPhone()) &&
                Objects.equals(getCardId(), adminWrap.getCardId());
    }

    @Override
    public String toString() {
        return "AdminWrap{" +
                "adminId=" + adminId +
                ", adminName='" + adminName + '\'' +
                ", adminPwd='" + adminPwd + '\'' +
                ", loginIP='" + loginIP + '\'' +
                ", lastTime='" + lastTime + '\'' +
                ", state='" + state + '\'' +
                ", role='" + role + '\'' +
                ", phone=" + phone +
                ", cardId=" + cardId +
                '}';
    }

    public AdminWrap(Integer adminId, String adminName, String adminPwd, String loginIP, String lastTime, String state, String role, String phone, String cardId) {
        this.adminId = adminId;
        this.adminName = adminName;
        this.adminPwd = adminPwd;
        this.loginIP = loginIP;
        this.lastTime = lastTime;
        this.state = state;
        this.role = role;
        this.phone = phone;
        this.cardId = cardId;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    @Override
    public int hashCode() {
        return Objects.hash(getAdminId(), getAdminName(), getAdminPwd(), getLoginIP(), getLastTime(), getState(), getRole());
    }

    public Integer getAdminId() {
        return adminId;
    }

    public void setAdminId(Integer adminId) {
        this.adminId = adminId;
    }

    public String getAdminName() {
        return adminName;
    }

    public void setAdminName(String adminName) {
        this.adminName = adminName;
    }

    public String getAdminPwd() {
        return adminPwd;
    }

    public void setAdminPwd(String adminPwd) {
        this.adminPwd = adminPwd;
    }

    public String getLoginIP() {
        return loginIP;
    }

    public void setLoginIP(String loginIP) {
        this.loginIP = loginIP;
    }

    public String getLastTime() {
        return lastTime;
    }

    public void setLastTime(String lastTime) {
        this.lastTime = lastTime;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public AdminWrap() {
    }

    public AdminWrap(Integer adminId, String adminName, String adminPwd, String loginIP, String lastTime, String state, String role) {
        this.adminId = adminId;
        this.adminName = adminName;
        this.adminPwd = adminPwd;
        this.loginIP = loginIP;
        this.lastTime = lastTime;
        this.state = state;
        this.role = role;
    }
}
